Configuration
Props
All the prop and object coords can be found in config.*.lua file. By default, we made config files for GTA:O casino, and GABZ Casino.
Rewards
For configuring the rewards you can either use the config_rewards.lua
script from the root directory, or use the ingame menu.
In the config file you will find an array of objects of the type:
{
name = "$50000", -- Display name on the wheel
count = 50000, -- Count of the item that the winner receives
itemName = "money", -- Name of the item that the winner receives
type = "item", -- Type (item/vehicle/mystery)
chance = 1, -- Chance in percent
anim = "win_exit" -- Animation (win_exit/win_big/win_huge)
},
Parameters
- name - The display name that will be shown on the wheel itself
- count - The amount of item that the winner receives
- itemName - The 'script' name of the item (spawnname)
- type - If set to 'item' will give an item, if set to 'vehicle' it will call the
AddVehicle
function inserver/main.lua
. When set to 'mystery' it will call theMysteryReward
function inserver/main.lua
. - chance - The chance that the item will be chosen. If you want the chances to be percent, all the chances must sum to 100.
- anim - The animation that player ped will play on win.
Admin panel
The admin panel will let you configure the wheel in real time without the need for restarting the script. From the top you will be able to see:
- Notification if the chances are not summing to 100 and in brackets the sum
- List of currently added entries
- The editor to add new ones
On the right of every item you can find an edit
icon that will enter the edit mode for the entry.
This is the example config for 10% chance for winning 10000 casino chips. You set the type to item
,
animation is set to win_big
and all the item data is inputted. Items are selected from a dropdown
list with search for ease of finding valid items.
For vehicles everything works the same except that you should input the vehicle spawn name instead of item name. If the newly added or edited vehicle has the lowest chance out of all the vehicles the casino announcer will call out that 'New luxurious vehicle is available at the lucky wheel' (only works with the sf-casinoutils script).
Server Configuration
In the server/main.lua
file you can add your own logic for wheel changing permissions,
mystery rewards and vehicle addition. Like this:
function CanChangeWheel(source)
return IsPlayerAceAllowed(tostring(source), ChangePermission)
end
function MysteryReward(source, name)
end
function AddVehicle(source, model)
end
For vehicle we have prepared support for esx_garages and qb-garages
You can also implement your own logic for getting the item list (i.e. if you want to use society items) in the server file.